<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">

		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
        var setting = {data:{simpleData:{enable:true,idKey:"id",pIdKey:"pId",rootPId:'0'}},
            callback:{onClick:function(event, treeId, treeNode){
                if(treeNode.pId != '0'){
                    loadDiv('rigthCenterDiv',"${ctx}/oper/examType/examItemListRight?examTypeId="+treeNode.id);
                }

            }
            }
        };
       //加载添加页面
       function loadExamClinic(divId,url){
           var nodes = [];
           nodes=examTypeTree.getSelectedNodes();
           if(nodes.length==0){
               toastr.error("请选择检查类别");
               return;
           }
           if(nodes[0].pId=='0'){
               toastr.error("该类别为一级类别，无项目加载");
               return;
           }
           $("#"+divId).load(url+"?examId="+nodes[0].id);
       }

        $.getJSON("${ctx}/oper/examType/treeData",function(data){
            examTypeTree=$.fn.zTree.init($("#ztree"), setting, data)
            examTypeTree.expandAll(true);
            if("${examTypeId}"!=""){
                var node = examTypeTree.getNodeByParam("id","${examTypeId}");
                examTypeTree.selectNode(node);
            }
        });
</script>
<div class="app">
    <section class="layout">
        <!-- sidebar menu -->

        <!-- /sidebar menu -->

        <!-- mail sidebar navigation -->
        <aside class="sidebar-250 canvas-right bg-default ">
            <header class="header navbar clearfix bb bg-default pl0 pr0">
                <p class="navbar-text">检查类别</p>
                <div class="btn-group pull-right mr10">
                    <button type="button" class="btn btn-sm btn-primary navbar-btn">
                        <i class="ti-comment-alt"></i>
                    </button>
                    <button type="button" class="btn btn-sm btn-primary navbar-btn">
                        <i class="ti-help-alt"></i>
                    </button>
                </div>
            </header>

            <div class="content-wrap no-p">

                <div class="wrapper">

                    <div class="m15">
                        <div id="ztree" class="ztree">

                        </div>
                    </div>

                </div>
            </div>
        </aside>
        <!-- /mail sidebar navigation -->

        <!-- main content -->
        <section class="main-content" id="rigthCenterDiv">
            <jsp:include page="examVsClinicIndexRight.jsp"/>
        </section>
        <!-- /main content -->
    </section>
</div>